package com.eastseeway.radioproject.gmn;

import android.widget.ImageView;

import androidx.databinding.BindingAdapter;

import com.eastseeway.radioproject.R;
import com.eastseeway.radioproject.RadioApplication;

public class BindingAdapters {

    @BindingAdapter("image")
    public static void setImage(ImageView imageView, String type) {
        switch (type) {
            case "foot": imageView.setBackground(RadioApplication.getAppContext().getResources().getDrawable(R.mipmap.icon_foot));break;
            case "auto0.5": imageView.setBackground(RadioApplication.getAppContext().getResources().getDrawable(R.mipmap.auto_0_5s));break;
            case "auto1": imageView.setBackground(RadioApplication.getAppContext().getResources().getDrawable(R.mipmap.auto_1s));break;
            case "auto2": imageView.setBackground(RadioApplication.getAppContext().getResources().getDrawable(R.mipmap.auto_2s));break;
        }

    }
}
